/*
 * @Author: pengtianrui 2276608413@qq.com
 * @Date: 2024-07-24 19:37:37
 * @LastEditors: 武兴创 superjava@vip.qq.com
 * @LastEditTime: 2024-08-28 17:42:22
 * @FilePath: \SGFEM\DataStructure\FEM\Element\include\CHEXAData.h
 * @Description: CHEXAData单元数据
 * CHEXA
 */

#pragma once
#include <vector>

#include "DataStructure/Common/DataStructureNamespace.h"
#include "DataStructure/Common/Id.h"
#include "DataStructure/Input/Element/ElementBase.h"

SG_DATASTRUCTURE_FEM_NAMESPACE_OPEN
struct DECLSPEC CHEXAData : public ElementBase
{
    SG::DataStructure::Common::Id m_pId      = 0;      ///< property's id
    SG::DataStructure::Common::Id m_g[20]    = { 0 };  ///< nodes' id
    SG::DataStructure::Common::Id m_domainId = 0;

    /// @brief接收一个vector<double>,长度为20，将其值赋值给m_g[20]
    void Set8Points (const std::vector<SG::DataStructure::Common::Id>& g);

  protected:
    CHEXAData () = default;
    // 友元声明
    DB_CREATE_FRIEND ()
};

struct DECLSPEC CHEXA20Data : public CHEXAData
{};
struct DECLSPEC CHEXA8Data : public CHEXAData
{};

DECLSPEC bool operator== (const CHEXAData& a, const CHEXAData& b);

SG_DATASTRUCTURE_FEM_NAMESPACE_CLOSE